#!/bin/bash
echo Removing generated files...
FILE="Trading space for time in explicit-state model checking"
function rmFile {
    local FN=$FILE$1
    if [ -e "$FN" ]; then
        echo removing file: \"$1\"
        rm "$FN"
    else
        echo skipping file: \"$1\"
    fi
}
rmFile .aux
rmFile .blg
rmFile .dvi
rmFile .fdb_latexmk
rmFile .fls
rmFile .log
rmFile .run.xml
rmFile .tex~
rmFile .tex.blg
if [ $1 == "-b" ]; then
    rmFile .bbl
    rmFile .bcf
    rmFile .toc
fi
echo Done!
